package com.wsl;

import com.wsl.Service.AsyncTaskService;
import com.wsl.config.TaskExecutorConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author:WangShuliang
 * @Description:
 * @Date:Created in 19:24 2017/11/24
 * @Modified by:
 */
public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);
        AsyncTaskService asyncTaskService = context.getBean(AsyncTaskService.class);
        for (int i=0;i<10;i++){
            asyncTaskService.executeAsyncTask(i);
            //asyncTaskService.executeAsyncTaskPlus(i);
        }
        context.close();
    }
}